package com.jushu.storbox.filter;

import java.io.File;
import java.io.FileFilter;

import com.jushu.storbox.constant.Constant;
import com.jushu.storbox.util.PublicTools;

public class MadieFilter implements FileFilter {

	@Override
	public boolean accept(File file) {
		boolean result = false;
		if(file.isFile()) {
			String fileName = file.getName();
			if(PublicTools.isFileType(fileName, Constant.IMAGE_TYPE)) {
				result = true;
			} else if(PublicTools.isFileType(fileName, Constant.VIDEO_TYPE)) {
				result = true;
			}
		}
		return result;
	}

}
